import Vue from 'vue'
import store from '../../../store' //vuex
import axios from 'axios'
Vue.prototype.axios = axios
export default {
  axiosPOst(url,data,dd){
    axios.post(url,data,{
      headers: { Authorization: sessionStorage.getItem('token')}
    }).then(res =>{
      var st;
      clearTimeout(st)
      store.dispatch('showloader')
      st = setTimeout(() =>{
        if(res != null || res != undefined){
          return {
            stores:store.dispatch('hideloader'),
            ress:res
          } 
        }
        clearTimeout(st)                                                                       
      },2000)
    }).catch(error=>{
      return {
        stores:store.dispatch('hideloader'),
        errors:error
      } 
    })
  },

  // axiosget(url,data,dd){
  //   return this.busaxios(url,data,dd)
  // },
  // axiosOther(url,data,dd){
  //   return this.busaxios(url,data,dd)
  // },
  
}